package client02;

/**
 * @author cs
 * @date 2021/3/21 11:42
 */
public class Singleton6 {
    private Singleton6() {
    }
    private static class Instance {
        private static Singleton6 singleton = new Singleton6();
    }
    public static Singleton6 getInstance() {
        return Instance.singleton;
    }
    public static void main(String[] args) {
        Singleton6 singleton1 = Singleton6.getInstance();
        Singleton6 singleton2 = Singleton6.getInstance();
        System.out.println(singleton1==singleton2);
    }
}
